import axios from 'axios';
import common from './common';


/**
 * post请求 封装主机地址
 * @param {*} url 
 * @param {*} params 
 * @returns 
 */
function post(url, params) {
    console.log('api --> ','发送post请求')
    return axios.post(common.API_HOST + url, params);
}
/**
 * get请求 封装主机地址
 * @param {*} url 
 * @param {*} params 
 * @returns 
 */
function get(url, params) {
    console.log('api --> ','发送post请求')
    return axios.get(common.API_HOST + url, {params});
}


export default {
    post, get
}
